package com.hhh.springai_test.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hhh.springai_test.model.dto.communityPost.AddCommunityPostDTO;
import com.hhh.springai_test.model.dto.communityPost.QueryCommunityPostDTO;
import com.hhh.springai_test.model.dto.communityPost.UpdateCommunityPostDTO;
import com.hhh.springai_test.model.po.CommunityPost;

/**
* @author 29915
* @description 针对表【community_post(社区帖子表)】的数据库操作Service
* @createDate 2025-02-02 11:59:41
*/
public interface CommunityPostService extends IService<CommunityPost> {
    /**
     * 创建帖子
     * @param addCommunityPostDTO
     * @return
     */
    long createPost(AddCommunityPostDTO addCommunityPostDTO);

    /**
     * 更新帖子
     * @param updateCommunityPostDTO
     * @return
     */
    boolean updatePost(UpdateCommunityPostDTO updateCommunityPostDTO);

    /**
     * 分页查询帖子
     * @param queryCommunityPostDTO
     * @return
     */
    Page<CommunityPost> queryPostPage(QueryCommunityPostDTO queryCommunityPostDTO);

    Boolean HxxRemoveById(Long id);
}
